package com.gdth.widget.dialog;

import com.gdth.R;
import com.gdth.widget.calendar.Calendar;
import com.gdth.widget.calendar.Calendar.onCalendarClickListener;

import android.content.Context;
import android.widget.LinearLayout;

/**
 * 日期选择提示框
 * @author Arvin
 *
 */
public class DialogCalendar extends BaseDialog implements onCalendarClickListener{
	private Context mContext;
	
	/**
	 * 选中的日期
	 */
	public String datetime;
	
	public DialogCalendar(Context context) {
		super(context, R.style.dialog_theme);
		
		this.mContext = context;
		initView();
	}
	
	/**
	 * 初始化
	 */
	private void initView(){
		super.initView(R.layout.system_dialog_calendar);
		
		LinearLayout layout = (LinearLayout) findViewById(R.id.dialog_body);
		
		Calendar mCalendar = new Calendar(this.mContext);
		mCalendar.setOnCalendarClickListener(this);
		layout.addView(mCalendar);
	}
	
	/**
	 * Calendar接口
	 * @param datetime
	 */
	@Override
	public void onSelectCalendarListener(String datetime) {
		// TODO Auto-generated method stub
		
		this.datetime = datetime;
	}
}
